home *** CD-ROM | disk | FTP | other *** search
-
-
-
- eeeexxxx((((1111)))) eeeexxxx((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- ex - text editor
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- eeeexxxx [----ssss] [----llll] [----LLLL] [----RRRR] [----rrrr file] [----tttt tag] [----vvvv] [----VVVV] [----xxxx] [----CCCC] [++++ command]
- [----cccc command] [----wwww size] file ...
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _e_x is the root of a family of editors: _e_x and _v_i. _e_x is a superset of
- _e_d, with the most notable extension being a display editing facility.
- Display based editing is the focus of _v_i.
-
- If you use a window or a CRT terminal, you may wish to use the _v_i(1)
- editor, which focuses on the display-editing portion of _e_x.
-
- FFFFoooorrrr eeeedddd UUUUsssseeeerrrrssss
- If you have used _e_d(1) you will find that, in addition to having all of
- the _e_d(1) commands available, _e_x has a number of additional features
- useful on CRT terminals. Intelligent terminals and high speed terminals
- are very pleasant to use with _v_i. Generally, the _e_x editor uses far more
- of the capabilities of terminals than _e_d(1) does and uses the terminal
- capability data base (see _t_e_r_m_i_n_f_o(4)) and the type of the terminal you
- are using from the environment variable TERM to determine how to drive
- your terminal efficiently. The editor makes use of features such as
- insert and delete character and line in its vvvviiiissssuuuuaaaallll command (which can be
- abbreviated vvvviiii) and which is the central mode of editing when using
- _v_i(1).
-
- _e_x contains a number of features for easily viewing the text of the file.
- The zzzz command gives easy access to windows of text. Typing ^^^^DDDD (control-
- d) causes the editor to scroll a half-window of text and is more useful
- for quickly stepping through a file than just typing return. Of course,
- the screen-oriented vvvviiiissssuuuuaaaallll mode gives constant access to editing context.
-
- _e_x gives you help when you make mistakes. The uuuunnnnddddoooo (uuuu) command allows
- you to reverse any single change that goes astray. _e_x gives you a lot of
- feedback, normally printing changed lines, and indicates when more than a
- few lines are affected by a command so that it is easy to detect when a
- command has affected more lines than it should have.
-
- The editor also normally prevents overwriting existing files, unless you
- edited them, so that you do not accidentally overwrite a file other than
- the one you are editing. If the system (or editor) crashes, or you
- accidentally hang up the telephone, you can use the editor rrrreeeeccccoooovvvveeeerrrr
- command (or ----rrrr _f_i_l_e option) to retrieve your work. This gets you back to
- within a few lines of where you left off.
-
- _e_x has several features for dealing with more than one file at a time.
- You can give it a list of files on the command line and use the nnnneeeexxxxtttt (nnnn)
- command to deal with each in turn. The nnnneeeexxxxtttt command can also be given a
- list of filenames, or a pattern as used by the shell to specify a new set
- of files to be dealt with. In general, filenames in the editor can be
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- eeeexxxx((((1111)))) eeeexxxx((((1111))))
-
-
-
- formed with full shell metasyntax. The metacharacter %%%% is also available
- in forming filenames and is replaced by the name of the current file.
- For editing large groups of related files you can use _e_x's ttttaaaagggg command to
- quickly locate functions and other important points in any of the files.
- This is useful when working on a large program when you want to quickly
- find the definition of a particular function. The _c_t_a_g_s(1) utility
- builds a _t_a_g_s file for C, Pascal, and FORTRAN programs.
-
- The editor has a group of buffers whose names are the ASCII lower-case
- letters (aaaa-zzzz). You can place text in these named buffers where it is
- available to be inserted elsewhere in the file. The contents of these
- buffers remain available when you begin editing a new file using the eeeeddddiiiitttt
- (eeee) command.
-
- There is a command &&&& in _e_x that repeats the last ssssuuuubbbbssssttttiiiittttuuuutttteeee command. In
- addition, there is a confirmed substitute command. You give a range of
- substitutions to be done and the editor interactively asks whether each
- substitution is desired.
-
- It is possible to ignore the case of letters in searches and
- substitutions. _e_x also allows regular expressions that match words to be
- constructed. This is convenient, for example, in searching for the word
- eeeeddddiiiitttt if your document also contains the word eeeeddddiiiittttoooorrrr. See the rrrreeeeggggccccoooommmmpppp(5)
- man page for information about using the regular expression syntax. This
- version of _e_x is X/Open compliant and uses the X/Open defined regular
- expression syntax.
-
- _e_x has a set of options that you can set to tailor it to your liking.
- One option that is very useful is the aaaauuuuttttooooiiiinnnnddddeeeennnntttt option that allows the
- editor to supply leading white space to align text automatically. You
- can then use ^^^^DDDD as a backtab and space or tab to move forward to align
- new code easily.
-
- Miscellaneous useful features include an intelligent jjjjooooiiiinnnn (jjjj) command
- that supplies white space between joined lines automatically, commands <<<<
- and >>>> that shift groups of lines, and the ability to filter portions of
- the buffer through commands such as _s_o_r_t(1).
-
- IIIInnnnvvvvooooccccaaaattttiiiioooonnnn OOOOppppttttiiiioooonnnnssss
- The following invocation options are interpreted by _e_x (previously
- documented options are discussed in the NNNNOOOOTTTTEEEESSSS section at the end of this
- manual page):
-
- ----ssss Suppress all interactive-user feedback. This is useful in
- processing editor scripts.
-
- ----llll Set lisp mode; indents appropriately for Lisp code; the (),
- {}, [[[[[[[[ and ]]]]]]]] commands in visual mode are modified to have
- meaning for Lisp.
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- eeeexxxx((((1111)))) eeeexxxx((((1111))))
-
-
-
- ----LLLL List the names of all files saved as the result of an editor
- or system crash.
-
- ----RRRR RRRReeeeaaaaddddoooonnnnllllyyyy mode; the rrrreeeeaaaaddddoooonnnnllllyyyy flag is set, preventing
- accidental overwriting of the file. ----rrrr _f_i_l_e Edit _f_i_l_e after
- an editor or system crash. (Recovers the version of _f_i_l_e
- that was in the buffer when the crash occurred.)
-
- ----tttt _t_a_g Edit the file containing the _t_a_g and position the editor at
- its definition.
-
- ----vvvv Invoke _v_i.
-
- ----xxxx Encryption option; when used, _e_x simulates an XXXX command and
- prompts the user for a key. This key is used to encrypt and
- decrypt text using the algorithm of _c_r_y_p_t(1). The XXXX command
- makes an educated guess to determine whether text read in is
- encrypted or not. The temporary buffer file is encrypted
- also, using a transformed version of the key typed in for
- the ----xxxx option. See _c_r_y_p_t(1).
-
- ----CCCC Encryption option; the same as the ----xxxx option, except that _e_x
- simulates a CCCC command. The CCCC command is like the XXXX command,
- except that all text read in is assumed to have been
- encrypted.
-
- ++++ _c_o_m_m_a_n_d Begin editing by executing the specified _e_x command-mode
- commands. As with normal editing command-line entries, the
- _c_o_m_m_a_n_d option-argument can consist of multiple _e_x commands
- separated by vertical-line characters (|). The use of
- commands that enter input or visual modes in this manner
- produces undefined results.
-
- ----wwww _s_i_z_e Set the value of the _w_i_n_d_o_w editor option to _s_i_z_e.
-
- ----cccc _c_o_m_m_a_n_d Begin editing by executing the specified editor _c_o_m_m_a_n_d
- (usually a search or positioning command).
-
- The _f_i_l_e argument indicates one or more files to be edited.
-
- eeeexxxx SSSSttttaaaatttteeeessss
- Command Normal and initial state. Input prompted for by ::::. Your line
- kill character cancels a partial command.
-
- Insert Entered by aaaa, iiii, or cccc. Arbitrary text can be entered. Insert
- state normally is terminated by a line having only "...." on it,
- or, abnormally, with an interrupt.
-
- Visual Entered by typing vvvviiii; terminated by typing QQQQ or ^\ (control-\).
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- eeeexxxx((((1111)))) eeeexxxx((((1111))))
-
-
-
- eeeexxxx CCCCoooommmmmmmmaaaannnndddd NNNNaaaammmmeeeessss aaaannnndddd AAAAbbbbbbbbrrrreeeevvvviiiiaaaattttiiiioooonnnnssss
- aaaabbbbbbbbrrrreeeevvvv aaaabbbb mmmmaaaapppp sssseeeetttt sssseeee
- aaaappppppppeeeennnndddd aaaa mmmmaaaarrrrkkkk mmmmaaaa sssshhhheeeellllllll sssshhhh
- aaaarrrrggggssss aaaarrrr mmmmoooovvvveeee mmmm ssssoooouuuurrrrcccceeee ssssoooo
- cccchhhhaaaannnnggggeeee cccc nnnneeeexxxxtttt nnnn ssssuuuubbbbssssttttiiiittttuuuutttteeee ssss
- ccccooooppppyyyy ccccoooo nnnnuuuummmmbbbbeeeerrrr nnnnuuuu uuuunnnnaaaabbbbbbbbrrrreeeevvvv uuuunnnnaaaabbbb
- ddddeeeelllleeeetttteeee dddd pppprrrreeeesssseeeerrrrvvvveeee pppprrrreeee uuuunnnnddddoooo uuuu
- eeeeddddiiiitttt eeee pppprrrriiiinnnntttt pppp uuuunnnnmmmmaaaapppp uuuunnnnmmmm
- ffffiiiilllleeee ffff ppppuuuutttt ppppuuuu vvvveeeerrrrssssiiiioooonnnn vvvveeee
- gggglllloooobbbbaaaallll gggg qqqquuuuiiiitttt qqqq vvvviiiissssuuuuaaaallll vvvviiii
- iiiinnnnsssseeeerrrrtttt iiii rrrreeeeaaaadddd rrrr wwwwrrrriiiitttteeee wwww
- jjjjooooiiiinnnn jjjj rrrreeeeccccoooovvvveeeerrrr rrrreeeecccc xxxxiiiitttt xxxx
- lllliiiisssstttt llll rrrreeeewwwwiiiinnnndddd rrrreeeewwww yyyyaaaannnnkkkk yyyyaaaa
-
- eeeexxxx CCCCoooommmmmmmmaaaannnnddddssss
- shell escape !!!!
- forced encryption CCCC
- heuristic encryption XXXX
- lshift <<<<
- print next CR
- resubst &&&&
- rshift >>>>
- scroll ^^^^DDDD
- window zzzz
-
- eeeexxxx CCCCoooommmmmmmmaaaannnndddd AAAAddddddddrrrreeeesssssssseeeessss
- _n line _n ////_p_a_t next with _p_a_t
- .... current ????_p_a_t previous with _p_a_t
- $$$$ last _x----_n _n before _x
- ++++ next _x,,,,_y _x through _y
- ---- previous ''''_x marked with _x
- ++++_n _n forward '''''''' previous context
- %%%% 1,$
-
- IIIInnnniiiittttiiiiaaaalllliiiizzzziiiinnnngggg ooooppppttttiiiioooonnnnssss
- EEEEXXXXIIIINNNNIIIITTTT place sssseeeetttt's here in environment variable
- $$$$HHHHOOOOMMMMEEEE////....eeeexxxxrrrrcccc editor initialization file
- ....////....eeeexxxxrrrrcccc editor initialization file
- sssseeeetttt _x enable option _x
- sssseeeetttt nnnnoooo_x disable option _x
- sssseeeetttt _x====_v_a_l give value _v_a_l to option _x
- sssseeeetttt show changed options
- sssseeeetttt aaaallllllll show all options
- sssseeeetttt _x???? show value of option _x
-
- If the EEEEXXXXIIIINNNNIIIITTTT environment variable is set, initialization options are
- taken from that variable. Otherwise, initialization options are taken
- from $$$$HHHHOOOOMMMMEEEE////....eeeexxxxrrrrcccc, if it exists. Finally, if the eeeexxxxrrrrcccc option is set
- (either by EEEEXXXXIIIINNNNIIIITTTT or $$$$HHHHOOOOMMMMEEEE////....eeeexxxxrrrrcccc,) initialization options are taken from
- ....////....eeeexxxxrrrrcccc, if it exists.
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- eeeexxxx((((1111)))) eeeexxxx((((1111))))
-
-
-
- MMMMoooosssstttt uuuusssseeeeffffuuuullll ooooppppttttiiiioooonnnnssss aaaannnndddd tttthhhheeeeiiiirrrr aaaabbbbbbbbrrrreeeevvvviiiiaaaattttiiiioooonnnnssss
- aaaauuuuttttooooiiiinnnnddddeeeennnntttt aaaaiiii supply indent
- aaaauuuuttttoooowwwwrrrriiiitttteeee aaaawwww write before changing files
- ddddiiiirrrreeeeccccttttoooorrrryyyy pathname of directory for temporary work files
- allow _v_i/_e_x to read the ....eeeexxxxrrrrcccc in the current
- directory; this option is set in the EEEEXXXXIIIINNNNIIIITTTT shell
- variable or in the ....eeeexxxxrrrrcccc file in the $$$$HHHHOOOOMMMMEEEE directory
- eeeexxxxrrrrcccc eeeexxxx
-
-
- iiiiggggnnnnoooorrrreeeeccccaaaasssseeee iiiicccc ignore case of letters in scanning
- lllliiiisssstttt print ^^^^IIII for tab, $ at end
- mmmmaaaaggggiiiicccc treat .... [[[[ **** special in patterns
- mmmmooooddddeeeelllliiiinnnneeeessss first five lines and last five lines executed as
- _v_i/_e_x commands if they are of the form
- eeeexxxx::::_c_o_m_m_a_n_d:::: or vvvviiii::::_c_o_m_m_a_n_d::::
- nnnnuuuummmmbbbbeeeerrrr nnnnuuuu number lines
- ppppaaaarrrraaaaggggrrrraaaapppphhhhssss ppppaaaarrrraaaa macro names that start paragraphs
- rrrreeeeddddrrrraaaawwww simulate smart terminal
- rrrreeeeppppoooorrrrtttt informs you if the number of lines modified by the
- last command is greater than the value of the
- rrrreeeeppppoooorrrrtttt variable
- ssssccccrrrroooollllllll command mode lines
- sssseeeeccccttttiiiioooonnnnssss sssseeeecccctttt macro names that start sections
- sssshhhhiiiiffffttttwwwwiiiiddddtttthhhh sssswwww for <<<< >>>>, and input ^^^^DDDD
- sssshhhhoooowwwwmmmmaaaattttcccchhhh ssssmmmm to )))) and }}}} as typed
- sssshhhhoooowwwwmmmmooooddddeeee ssssmmmmdddd show insert mode in _v_i
- sssslllloooowwwwooooppppeeeennnn sssslllloooowwww stop updates during insert
- tttteeeerrrrmmmm specifies to vvvviiii the type of terminal being used (the
- default is the value of the environment variable TTTTEEEERRRRMMMM)
- wwwwiiiinnnnddddoooowwww visual mode lines
- wwwwrrrraaaappppmmmmaaaarrrrggggiiiinnnn wwwwmmmm automatic line splitting
- wwwwrrrraaaappppssssccccaaaannnn wwwwssss search around end (or beginning) of buffer
-
- SSSSccccaaaannnnnnnniiiinnnngggg ppppaaaatttttttteeeerrrrnnnn ffffoooorrrrmmmmaaaattttiiiioooonnnn
- ^^^^ beginning of line
- $$$$ end of line
- .... any character
- \\\\<<<< beginning of word
- \\\\>>>> end of word
- [[[[_s_t_r]]]] any character in _s_t_r
- [[[[^^^^_s_t_r]]]] any character not in _s_t_r
- [[[[_x-_y]]]] any character between _x and _y
- **** any number of preceding characters
-
- FFFFIIIILLLLEEEESSSS
- /usr/lib/exrecover recover command
- /usr/lib/expreserve preserve command
- /usr/share/lib/terminfo/* describes capabilities of terminals
- $HOME/.exrc editor startup file
- ./.exrc editor startup file
- /tmp/Ex_n_n_n_n_n editor temporary
- /tmp/Rx_n_n_n_n_n named buffer temporary
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- eeeexxxx((((1111)))) eeeexxxx((((1111))))
-
-
-
- /usr/preserve/_l_o_g_i_n preservation directory (where _l_o_g_i_n is the
- user's login name)
-
- NNNNOOOOTTTTEEEESSSS
- Several options, although they continue to be supported, have been
- replaced in the documentation by options that follow the Command Syntax
- Standard (see _i_n_t_r_o(1)). The ---- option has been replaced by ----ssss, a ----rrrr
- option that is not followed with an option-argument has been replaced by
- ----LLLL, and ++++_c_o_m_m_a_n_d has been replaced by ----cccc _c_o_m_m_a_n_d.
-
- _e_x has a limit of 15,687,678 editable lines. Attempts to edit or create
- files larger than this limit cause _e_x to terminate with an appropriate
- error message.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- crypt(1), ctags(1), ed(1), edit(1), grep(1), sed(1), sort(1), vi(1),
- curses(3X), term(4), terminfo(4), regcomp(5).
-
- BBBBUUUUGGGGSSSS
- The zzzz command prints the number of logical rather than physical lines.
- More than a screen full of output may result if long lines are present.
-
- File input/output errors do not print a name if the command line ----ssss
- option is used.
-
- There is no easy way to do a single scan ignoring case.
-
- The editor does not warn if text is placed in named buffers and not used
- before exiting the editor.
-
- Null characters are discarded in input files and cannot appear in
- resultant files.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-